<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <div id="app">
        <button @click="reverseString">点击我取反显示</button>
        <p>{{ msg }}</p>
      </div>
      
      <script src="./vue.js"></script>
      <script>
        new Vue({
          el: '#app',
          data: {
            msg: 'hello,world',
          },
          methods: {
            reverseString() {
              this.msg =  this.msg.split('').reverse().join('');
            }
          }
        });
      </script>
  </body>
</html>
